package com.hlf.common.utils;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import java.util.HashMap;
import java.util.Map;

/**
 * 
 * 读取配置文件属性工具类<br>
 * 采用静态内部类实现单例模式(@value("${key}")方式不支持静态变量注入)
 * 
 * @author shuliangxing
 * 
 * @date 2014-12-12下午3:00:45
 */
@Component
@ConfigurationProperties
public class PropertieUtil {


    private Map<String, String> prop = new HashMap<>(); //接收prop1里面的属性值

    public Map<String, String> getProp() {
        return prop;
    }

    public void setProp(Map<String, String> prop) {
        this.prop = prop;
    }

    public String getPropertie(String key) {
        return prop.get(key);
    }

}
